package com.example.nio.netty.protoco.response;

import com.example.nio.netty.protoco.Command;
import com.example.nio.netty.protoco.Packet;

public class MessageResponse extends Packet {
    private String fromUser;
    private String toUser;
    private String message;

    public MessageResponse() {
    }

    public MessageResponse(String fromUser, String toUser, String message) {
        this.fromUser = fromUser;
        this.toUser = toUser;
        this.message = message;
    }

    public String getFromUser() {
        return fromUser;
    }

    public void setFromUser(String fromUser) {
        this.fromUser = fromUser;
    }

    public String getToUser() {
        return toUser;
    }

    public void setToUser(String toUser) {
        this.toUser = toUser;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return fromUser+":" + message ;
    }

    @Override
    public Byte getCommand() {
        return Command.Message_Response;
    }
}
